<?php
$this->pageTitle = 'Error';
$this->breadcrumbs=array(
	'Error',
);
?>
<?php if (Yii::app()->user->isGuest) { ?>
<section class='section-wrapper not-found-w'>
	<div class='container'>
	  <div class='row'>
		<div class='span4'>
		  <img alt="Not-found-error" src="<?php echo Yii::app()->baseUrl; ?>/assets/images/not-found-error.png" />
		</div>
		<div class='span8'>
		  <h1>Page not found</h1>
		  <h4><?php echo CHtml::encode($error['message']); ?></h4>
		  <p>Let's try one of the following remedies to get you back on track...</p>
		  <div class='not-found-solutions btn-group'>
			<a href="javascript:history.go(-1);" class="btn"><i class='icon-circle-arrow-left'></i>
			  Revisit the previous page
			</a>
			<a href="<?php echo Yii::app()->baseUrl; ?>" class="btn"><i class='icon-home'></i>
			  Go to the homepage
			</a>
		  </div>
		  <div class='white-card extra-padding row-fluid'>
<?php if (Yii::app()->user->hasFlash('success')) { ?>
<div class="well well-large well-success">
	<i class="icon-ok"></i>
	<?php echo Yii::app()->user->getFlash('success'); ?>
</div>
<?php } else {
$form = $this->beginWidget('CActiveForm', array(
	'id'=>'feedback-form',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
));
?>
	<fieldset>
	<legend>Or tell us about it</legend>
	<div class="control-group">
		<?php echo $form->labelEx($model, 'email', array('class'=>'control-label')); ?>
		<div class="controls">
			<div class="input-icon input-icon-right">
				<?php echo $form->textField($model,'email',array('class'=>'span12')); ?>
			</div>
			<span class="help-inline"><?php echo $form->error($model,'email'); ?></span>
		</div>
	</div>
	<div class="control-group">
		<div class="controls">
			<?php echo $form->textArea($model,'content',array('class'=>'autosize-transition span12','placeHolder'=>BUtils::T('feedback_eg'))); ?>
			<span class="help-inline"><?php echo $form->error($model,'content'); ?></span>
		</div>
	</div>
	<div class="">
		<?php echo CHtml::submitButton(BUtils::T('confirm_btn'), array('class' => 'btn btn-primary')); ?>
	</div>
	</fieldset>
<?php
	$this->endWidget();
}
?>
		</div>
	  </div>
	</div>
  </div>
</section>
<?php } else { ?>

<div class="row-fluid">
	<div class="span12">
		<div class="error-container">
			<div class="well">
				<h1 class="grey lighter smaller">
					<span class="blue bigger-125">
						<i class="icon-sitemap"></i>
						404
					</span>
					Page Not Found
				</h1>
				<hr />
				<h3 class="lighter smaller">We looked everywhere but we couldn't find it!</h3>
				<div>
					<p><?php echo $error['message']; ?></p>
					<div class="space"></div>
					<h4 class="smaller">Try one of the following:</h4>

					<ul class="unstyled spaced inline bigger-110">
						<li>
							<i class="icon-hand-right blue"></i>
							Re-check the url for typos
						</li>
						<li>
							<i class="icon-hand-right blue"></i>
							<a href="<?php echo Yii::app()->createUrl('/help/faq') ?>">Read the faq</a>
						</li>
						<li>
							<i class="icon-hand-right blue"></i>
							<a href="<?php echo Yii::app()->createUrl('/feedback/form') ?>">Tell us about it</a>
						</li>
					</ul>
				</div>

				<hr />
				<div class="space"></div>

				<div class="row-fluid">
					<div class="center">
						<a href="javascript:history.go(-1);" class="btn btn-grey">
							<i class="icon-arrow-left"></i>
							Go Back
						</a>
						<a href="<?php echo Yii::app()->createUrl('/dashboard') ?>" class="btn btn-primary">
							<i class="icon-dashboard"></i>
							Dashboard
						</a>
					</div>
				</div>
			</div>
		</div><!--PAGE CONTENT ENDS-->
	</div><!--/.span-->
</div><!--/.row-fluid-->
<?php } ?>